import React from 'react';

import Constants from '../../common/Constants';
import BaseAction from '../common/BaseAction';
import ResponseConstants from '../../common/ResponseConstants';

export default class QZ_sendUpdateQZSettingAction extends BaseAction {
  constructor() {
    super();

    this.moduleType = Constants.MODULE_TYPE.QUAN_ZI;
    this.name = "QZ_sendUpdateQZSettingAction";
  }

  call(caller, data) {
    this._baseCall(caller, data);
    this.caller.setState({
      viewStatus: 2,
    })
  }

  finish(data, isSucceed) {
    if(isSucceed) {
        viewStatus = 3;
        statusText='修改成功'
    }
    else {
      viewStatus = 1;
      statusText='修改失败'
    }
    this.caller.setState({
      viewStatus: viewStatus,
      needRefresh: true,
      statusText:statusText,
    })
  }
}
